using UnityEngine;

[ExecuteInEditMode]
[RequireComponent(typeof(Renderer))]
public class SetRendererSortingOrder : MonoBehaviour
{
	[SerializeField]
	private int sortingOrder;

	private void Start()
	{
		GetComponent<Renderer>().sortingOrder = sortingOrder;
	}

	private void OnValidate()
	{
		Start();
	}
}
